<template>
    <div class="form-group" :class="fix">
        <label :class="!upTable ? 'labelSize':'control_up_label'" :style="labelWidth"><span class="required" v-if="required">*</span>{{title}}：</label>
        <slot></slot>
    </div>
</template>

<script>
    export default {
        props: {
            title: {type: String},
            left: {type: String, default: 2},
            primary: {type: Boolean, default: true},
            required: {type: Boolean, default: false},
            labelWidth:{type:String, default:""}
        },
        computed: {
            fix(){
                if(this.upTable){
                    return "fix_height"
                }  else{
                    return "fix_min_width"
                }
            },
        },
        methods: {
            reset () {
                this.value = "";
            }
        }

    }
</script>
